//
//  TestSecondViewController.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/24.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "TestSecondViewController.h"
#import <HBDNavigationController.h>
#import <UIViewController+HBD.h>


@interface TestSecondViewController ()

@end

@implementation TestSecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // self.showDefaultHUD = false;
    
    DPrint(@"%@", [[MMKV defaultMMKV] getObjectOfClass:[NSDictionary class] forKey:@"key_save_test_sss"]);
    
    NSDictionary *params = @{@"key" : @"00d91e8e0cca2b76f515926a36db68f5",
                             @"phone" : @"13594347817",
                             @"passwd" : @"123456",
                             };
    self.loadingCount++;
    [APIRequest POST_default:@"/login" params:params complete:^(APIResponse * _Nonnull response) {
        self.loadingCount--;
        if (![response.responseObject isKindOfClass:[NSDictionary class]]) {
            return;
        }
        for (int i = 0; i < 10000; i++) {
            [[MMKV defaultMMKV] setObject:response.responseObject forKey:@"key_save_test_sss"];
        }
    }];
    
    self.loadingCount++;
    [APIRequest GET_default:@"/login" params:params complete:^(APIResponse * _Nonnull response) {
        self.loadingCount--;
    }];
    
    self.loadingCount++;
    [APIRequest GET_default:API_test params:@{} complete:^(APIResponse * _Nonnull response) {
        self.loadingCount--;
    }];
    
//    self.navigationController.navigationBar.backgroundColor = UIColor.redColor;
    
    
    NSArray *arr = @[@1, @2];
//    arr[3];

}






/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
